#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

int main()
{
    char s[] = { "dvdf" };
        int count = 0;
        char* left = s;
        char* right = s;
        char* j = 0;
        int max = 0;
        while (*right)
        {
            if (left <= right)
            {
                for (j = left; j < right; j++)
                {
                    if (*j != *(right))
                    {
                        ;
                    }
                    else
                    {
                        left++;
                        right = left;
                        count = 0;
                        break;
                    }
                }
                count++;
                if (count > max)
                {
                    max = count;
                }
            }
            right++;
        }
        printf("%d ", max);
    }